.class public Lcom/kuguo/ad/n;
.super Landroid/widget/BaseAdapter;

# interfaces
.implements Lcom/kuguo/ad/al;


# instance fields
.field private a:Landroid/content/Context;

.field private b:Ljava/util/List;

.field private c:Lcom/kuguo/ad/x;

.field private d:I

.field private e:Landroid/os/Handler;

.field private f:Landroid/os/Handler;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;I)V
    .locals 1

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/kuguo/ad/n;->e:Landroid/os/Handler;

    new-instance v0, Lcom/kuguo/ad/y;

    invoke-direct {v0, p0}, Lcom/kuguo/ad/y;-><init>(Lcom/kuguo/ad/n;)V

    iput-object v0, p0, Lcom/kuguo/ad/n;->f:Landroid/os/Handler;

    iput-object p1, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    iput-object p2, p0, Lcom/kuguo/ad/n;->b:Ljava/util/List;

    iput p3, p0, Lcom/kuguo/ad/n;->d:I

    invoke-static {p1}, Lcom/kuguo/a/f;->a(Landroid/content/Context;)Lcom/kuguo/a/f;

    invoke-direct {p0}, Lcom/kuguo/ad/n;->a()V

    invoke-direct {p0}, Lcom/kuguo/ad/n;->b()V

    invoke-static {p0}, Lcom/kuguo/ad/KuguoAdsManager;->addOnAppInstallListener(Lcom/kuguo/ad/al;)V

    return-void
.end method

.method static synthetic a(Lcom/kuguo/ad/n;)Landroid/content/Context;
    .locals 1

    iget-object v0, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    return-object v0
.end method

.method private a()V
    .locals 1

    new-instance v0, Lcom/kuguo/ad/p;

    invoke-direct {v0, p0}, Lcom/kuguo/ad/p;-><init>(Lcom/kuguo/ad/n;)V

    invoke-virtual {v0}, Lcom/kuguo/ad/p;->start()V

    return-void
.end method

.method static synthetic a(Lcom/kuguo/ad/n;Lcom/kuguo/ad/o;)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/kuguo/ad/n;->b(Lcom/kuguo/ad/o;)V

    return-void
.end method

.method static synthetic a(Lcom/kuguo/ad/n;Ljava/util/List;)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/kuguo/ad/n;->a(Ljava/util/List;)V

    return-void
.end method

.method private a(Ljava/util/List;)V
    .locals 8

    const/4 v7, 0x0

    iget-object v0, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v0

    invoke-virtual {v0, v7}, Landroid/content/pm/PackageManager;->getInstalledPackages(I)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :cond_0
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_2

    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/content/pm/PackageInfo;

    new-instance v4, Landroid/content/Intent;

    const-string v1, "android.intent.action.MAIN"

    const/4 v2, 0x0

    invoke-direct {v4, v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v5

    :cond_1
    invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/kuguo/ad/o;

    iget-object v2, v1, Lcom/kuguo/ad/o;->i:Ljava/lang/String;

    iget-object v6, v0, Landroid/content/pm/PackageInfo;->packageName:Ljava/lang/String;

    invoke-virtual {v2, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_1

    const/4 v2, 0x1

    iput-boolean v2, v1, Lcom/kuguo/ad/o;->j:Z

    iget-object v2, v1, Lcom/kuguo/ad/o;->i:Ljava/lang/String;

    invoke-virtual {v4, v2}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    iget-object v2, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v2

    invoke-virtual {v2, v4, v7}, Landroid/content/pm/PackageManager;->queryIntentActivities(Landroid/content/Intent;I)Ljava/util/List;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v6

    :goto_0
    invoke-interface {v6}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_1

    invoke-interface {v6}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/content/pm/ResolveInfo;

    iget-object v2, v2, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;

    iget-object v2, v2, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;

    iput-object v2, v1, Lcom/kuguo/ad/o;->k:Ljava/lang/String;

    goto :goto_0

    :cond_2
    return-void
.end method

.method static synthetic b(Lcom/kuguo/ad/n;)Ljava/util/List;
    .locals 1

    iget-object v0, p0, Lcom/kuguo/ad/n;->b:Ljava/util/List;

    return-object v0
.end method

.method private b()V
    .locals 2

    iget-object v0, p0, Lcom/kuguo/ad/n;->e:Landroid/os/Handler;

    new-instance v1, Lcom/kuguo/ad/m;

    invoke-direct {v1, p0}, Lcom/kuguo/ad/m;-><init>(Lcom/kuguo/ad/n;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    return-void
.end method

.method private b(Lcom/kuguo/ad/o;)V
    .locals 5

    new-instance v0, Lcom/kuguo/a/d;

    iget-object v1, p1, Lcom/kuguo/ad/o;->q:Ljava/lang/String;

    iget-object v2, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    const-string v3, "icon.png"

    iget v4, p1, Lcom/kuguo/ad/o;->h:I

    invoke-static {v2, v3, v4}, Lcom/kuguo/ad/a;->b(Landroid/content/Context;Ljava/lang/String;I)Ljava/io/File;

    move-result-object v2

    const/4 v3, 0x0

    invoke-direct {v0, v1, v2, v3}, Lcom/kuguo/a/d;-><init>(Ljava/lang/String;Ljava/io/File;I)V

    iget v1, p1, Lcom/kuguo/ad/o;->h:I

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/kuguo/a/d;->a(Ljava/lang/Object;)V

    new-instance v1, Lcom/kuguo/ad/x;

    iget-object v2, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    iget-object v3, p0, Lcom/kuguo/ad/n;->f:Landroid/os/Handler;

    invoke-direct {v1, v2, p1, v3}, Lcom/kuguo/ad/x;-><init>(Landroid/content/Context;Lcom/kuguo/ad/o;Landroid/os/Handler;)V

    iput-object v1, p0, Lcom/kuguo/ad/n;->c:Lcom/kuguo/ad/x;

    iget-object v1, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    iget-object v2, p0, Lcom/kuguo/ad/n;->c:Lcom/kuguo/ad/x;

    invoke-static {v1, v0, v2}, Lcom/kuguo/ad/r;->a(Landroid/content/Context;Lcom/kuguo/a/d;Lcom/kuguo/a/c;)V

    return-void
.end method


# virtual methods
.method public a(Lcom/kuguo/ad/o;)V
    .locals 6

    new-instance v1, Landroid/content/Intent;

    const-string v0, "android.intent.action.MAIN"

    const/4 v2, 0x0

    invoke-direct {v1, v0, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    iget-object v0, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v2

    iget-object v0, p0, Lcom/kuguo/ad/n;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :cond_0
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/kuguo/ad/o;

    iget v4, p1, Lcom/kuguo/ad/o;->h:I

    iget v5, v0, Lcom/kuguo/ad/o;->h:I

    if-ne v4, v5, :cond_0

    const/4 v4, 0x1

    iput-boolean v4, v0, Lcom/kuguo/ad/o;->j:Z

    iget-object v4, v0, Lcom/kuguo/ad/o;->i:Ljava/lang/String;

    invoke-virtual {v1, v4}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    const/4 v4, 0x0

    invoke-virtual {v2, v1, v4}, Landroid/content/pm/PackageManager;->queryIntentActivities(Landroid/content/Intent;I)Ljava/util/List;

    move-result-object v4

    invoke-interface {v4}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v4

    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-eqz v5, :cond_0

    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/content/pm/ResolveInfo;

    iget-object v1, v1, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;

    iget-object v1, v1, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;

    iput-object v1, v0, Lcom/kuguo/ad/o;->k:Ljava/lang/String;

    invoke-virtual {p0}, Lcom/kuguo/ad/n;->notifyDataSetChanged()V

    :cond_1
    return-void
.end method

.method public getCount()I
    .locals 1

    iget-object v0, p0, Lcom/kuguo/ad/n;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lcom/kuguo/ad/n;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-ge p1, v0, :cond_0

    iget-object v0, p0, Lcom/kuguo/ad/n;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    :goto_0
    return-object v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public getItemId(I)J
    .locals 2

    iget-object v0, p0, Lcom/kuguo/ad/n;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-ge p1, v0, :cond_0

    iget-object v0, p0, Lcom/kuguo/ad/n;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/kuguo/ad/o;

    iget v0, p0, Lcom/kuguo/ad/o;->h:I

    int-to-long v0, v0

    :goto_0
    return-wide v0

    :cond_0
    const-wide/16 v0, 0x0

    goto :goto_0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 10

    const v9, -0x6d39c6

    const/4 v8, -0x1

    const/4 v2, -0x2

    const/4 v7, 0x0

    const/4 v6, 0x1

    iget v0, p0, Lcom/kuguo/ad/n;->d:I

    if-ne v0, v6, :cond_3

    instance-of v0, p2, Lcom/kuguo/ad/ac;

    if-eqz v0, :cond_2

    check-cast p2, Lcom/kuguo/ad/ac;

    invoke-virtual {p2}, Lcom/kuguo/ad/ac;->a()V

    invoke-virtual {p2, v7}, Lcom/kuguo/ad/ac;->a(Z)V

    move-object v1, p2

    :goto_0
    iget-object v0, p0, Lcom/kuguo/ad/n;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/kuguo/ad/o;

    iget v2, v0, Lcom/kuguo/ad/o;->h:I

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "download/ads/"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    new-instance v3, Ljava/io/File;

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v4

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v5, "/icon.png"

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v3, v4, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_0

    iget-object v2, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/kuguo/c/c;->b(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    if-eqz v2, :cond_0

    invoke-virtual {v1, v2}, Lcom/kuguo/ad/ac;->a(Landroid/graphics/drawable/Drawable;)V

    :cond_0
    iget-boolean v2, v0, Lcom/kuguo/ad/o;->j:Z

    if-eqz v2, :cond_1

    const-string v2, ""

    iget-object v3, v0, Lcom/kuguo/ad/o;->k:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_1

    invoke-virtual {v1, v6}, Lcom/kuguo/ad/ac;->a(Z)V

    :cond_1
    iget-object v0, v0, Lcom/kuguo/ad/o;->g:Ljava/lang/String;

    invoke-virtual {v1, v0}, Lcom/kuguo/ad/ac;->a(Ljava/lang/String;)V

    move-object v0, v1

    :goto_1
    return-object v0

    :cond_2
    new-instance v0, Lcom/kuguo/ad/ac;

    iget-object v1, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/kuguo/ad/ac;-><init>(Landroid/content/Context;)V

    new-instance v1, Landroid/widget/AbsListView$LayoutParams;

    invoke-direct {v1, v8, v2}, Landroid/widget/AbsListView$LayoutParams;-><init>(II)V

    invoke-virtual {v0, v1}, Lcom/kuguo/ad/ac;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    move-object v1, v0

    goto :goto_0

    :cond_3
    iget v0, p0, Lcom/kuguo/ad/n;->d:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_7

    new-instance v1, Lcom/kuguo/ad/h;

    iget-object v0, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    invoke-direct {v1, v0}, Lcom/kuguo/ad/h;-><init>(Landroid/content/Context;)V

    new-instance v0, Landroid/widget/AbsListView$LayoutParams;

    invoke-direct {v0, v8, v2}, Landroid/widget/AbsListView$LayoutParams;-><init>(II)V

    invoke-virtual {v1, v0}, Lcom/kuguo/ad/h;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/kuguo/ad/n;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/kuguo/ad/o;

    iget v2, v0, Lcom/kuguo/ad/o;->h:I

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "download/ads/"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    new-instance v3, Ljava/io/File;

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v4

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v5, "/icon.png"

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v3, v4, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_4

    iget-object v2, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/kuguo/c/c;->b(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    if-eqz v2, :cond_4

    invoke-virtual {v1, v2}, Lcom/kuguo/ad/h;->a(Landroid/graphics/drawable/Drawable;)V

    :cond_4
    iget-object v2, v0, Lcom/kuguo/ad/o;->g:Ljava/lang/String;

    invoke-virtual {v1, v2}, Lcom/kuguo/ad/h;->a(Ljava/lang/String;)V

    iget-object v2, v0, Lcom/kuguo/ad/o;->n:Ljava/lang/String;

    invoke-virtual {v1, v2}, Lcom/kuguo/ad/h;->b(Ljava/lang/String;)V

    iget-object v2, v0, Lcom/kuguo/ad/o;->p:Ljava/lang/String;

    invoke-virtual {v1, v2}, Lcom/kuguo/ad/h;->c(Ljava/lang/String;)V

    iget v2, v0, Lcom/kuguo/ad/o;->o:I

    invoke-virtual {v1, v2}, Lcom/kuguo/ad/h;->a(I)V

    iget-boolean v2, v0, Lcom/kuguo/ad/o;->j:Z

    if-eqz v2, :cond_5

    const-string v2, ""

    iget-object v0, v0, Lcom/kuguo/ad/o;->k:Ljava/lang/String;

    invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_5

    invoke-virtual {v1, v6}, Lcom/kuguo/ad/h;->a(Z)V

    :cond_5
    new-instance v0, Landroid/graphics/drawable/StateListDrawable;

    invoke-direct {v0}, Landroid/graphics/drawable/StateListDrawable;-><init>()V

    rem-int/lit8 v2, p1, 0x2

    if-nez v2, :cond_6

    new-array v2, v6, [I

    const v3, 0x10100a7

    aput v3, v2, v7

    new-instance v3, Landroid/graphics/drawable/ColorDrawable;

    invoke-direct {v3, v9}, Landroid/graphics/drawable/ColorDrawable;-><init>(I)V

    invoke-virtual {v0, v2, v3}, Landroid/graphics/drawable/StateListDrawable;->addState([ILandroid/graphics/drawable/Drawable;)V

    new-array v2, v6, [I

    const v3, 0x101009e

    aput v3, v2, v7

    new-instance v3, Landroid/graphics/drawable/ColorDrawable;

    invoke-direct {v3, v8}, Landroid/graphics/drawable/ColorDrawable;-><init>(I)V

    invoke-virtual {v0, v2, v3}, Landroid/graphics/drawable/StateListDrawable;->addState([ILandroid/graphics/drawable/Drawable;)V

    :goto_2
    invoke-virtual {v1, v0}, Lcom/kuguo/ad/h;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    move-object v0, v1

    goto/16 :goto_1

    :cond_6
    new-array v2, v6, [I

    const v3, 0x10100a7

    aput v3, v2, v7

    new-instance v3, Landroid/graphics/drawable/ColorDrawable;

    invoke-direct {v3, v9}, Landroid/graphics/drawable/ColorDrawable;-><init>(I)V

    invoke-virtual {v0, v2, v3}, Landroid/graphics/drawable/StateListDrawable;->addState([ILandroid/graphics/drawable/Drawable;)V

    new-array v2, v6, [I

    const v3, 0x101009e

    aput v3, v2, v7

    new-instance v3, Landroid/graphics/drawable/ColorDrawable;

    const v4, -0x151414

    invoke-direct {v3, v4}, Landroid/graphics/drawable/ColorDrawable;-><init>(I)V

    invoke-virtual {v0, v2, v3}, Landroid/graphics/drawable/StateListDrawable;->addState([ILandroid/graphics/drawable/Drawable;)V

    goto :goto_2

    :cond_7
    iget v0, p0, Lcom/kuguo/ad/n;->d:I

    const/4 v1, 0x3

    if-ne v0, v1, :cond_c

    new-instance v1, Lcom/kuguo/ad/f;

    iget-object v0, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    invoke-direct {v1, v0}, Lcom/kuguo/ad/f;-><init>(Landroid/content/Context;)V

    new-instance v0, Landroid/widget/AbsListView$LayoutParams;

    invoke-direct {v0, v8, v2}, Landroid/widget/AbsListView$LayoutParams;-><init>(II)V

    invoke-virtual {v1, v0}, Lcom/kuguo/ad/f;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/kuguo/ad/n;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/kuguo/ad/o;

    iget v2, v0, Lcom/kuguo/ad/o;->h:I

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "download/ads/"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    new-instance v3, Ljava/io/File;

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v4

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v5, "/icon.png"

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v3, v4, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_8

    iget-object v2, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/kuguo/c/c;->b(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    if-eqz v2, :cond_8

    invoke-virtual {v1, v2}, Lcom/kuguo/ad/f;->a(Landroid/graphics/drawable/Drawable;)V

    :cond_8
    iget-object v2, v0, Lcom/kuguo/ad/o;->g:Ljava/lang/String;

    invoke-virtual {v1, v2}, Lcom/kuguo/ad/f;->a(Ljava/lang/String;)V

    iget-object v2, v0, Lcom/kuguo/ad/o;->G:Ljava/lang/String;

    invoke-virtual {v1, v2}, Lcom/kuguo/ad/f;->b(Ljava/lang/String;)V

    if-ltz p1, :cond_a

    const/16 v2, 0xa

    if-ge p1, v2, :cond_a

    const/high16 v2, 0x40a0

    invoke-virtual {v1, v2}, Lcom/kuguo/ad/f;->a(F)V

    :goto_3
    iget-boolean v2, v0, Lcom/kuguo/ad/o;->j:Z

    if-eqz v2, :cond_9

    const-string v2, ""

    iget-object v0, v0, Lcom/kuguo/ad/o;->k:Ljava/lang/String;

    invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_9

    invoke-virtual {v1, v6}, Lcom/kuguo/ad/f;->a(Z)V

    :cond_9
    move-object v0, v1

    goto/16 :goto_1

    :cond_a
    const/16 v2, 0xa

    if-lt p1, v2, :cond_b

    const/16 v2, 0x14

    if-ge p1, v2, :cond_b

    const/high16 v2, 0x4090

    invoke-virtual {v1, v2}, Lcom/kuguo/ad/f;->a(F)V

    goto :goto_3

    :cond_b
    const/high16 v2, 0x4080

    invoke-virtual {v1, v2}, Lcom/kuguo/ad/f;->a(F)V

    goto :goto_3

    :cond_c
    instance-of v0, p2, Lcom/kuguo/ad/ac;

    if-eqz v0, :cond_f

    check-cast p2, Lcom/kuguo/ad/ac;

    invoke-virtual {p2}, Lcom/kuguo/ad/ac;->a()V

    invoke-virtual {p2, v7}, Lcom/kuguo/ad/ac;->a(Z)V

    move-object v1, p2

    :goto_4
    iget-object v0, p0, Lcom/kuguo/ad/n;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/kuguo/ad/o;

    iget v2, v0, Lcom/kuguo/ad/o;->h:I

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "download/ads/"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    new-instance v3, Ljava/io/File;

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v4

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v5, "/icon.png"

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v3, v4, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_d

    iget-object v2, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/kuguo/c/c;->b(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    if-eqz v2, :cond_d

    invoke-virtual {v1, v2}, Lcom/kuguo/ad/ac;->a(Landroid/graphics/drawable/Drawable;)V

    :cond_d
    iget-boolean v2, v0, Lcom/kuguo/ad/o;->j:Z

    if-eqz v2, :cond_e

    iget-object v2, v0, Lcom/kuguo/ad/o;->k:Ljava/lang/String;

    const-string v3, ""

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_e

    invoke-virtual {v1, v6}, Lcom/kuguo/ad/ac;->a(Z)V

    :cond_e
    iget-object v0, v0, Lcom/kuguo/ad/o;->g:Ljava/lang/String;

    invoke-virtual {v1, v0}, Lcom/kuguo/ad/ac;->a(Ljava/lang/String;)V

    move-object v0, v1

    goto/16 :goto_1

    :cond_f
    new-instance v0, Lcom/kuguo/ad/ac;

    iget-object v1, p0, Lcom/kuguo/ad/n;->a:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/kuguo/ad/ac;-><init>(Landroid/content/Context;)V

    new-instance v1, Landroid/widget/AbsListView$LayoutParams;

    invoke-direct {v1, v2, v2}, Landroid/widget/AbsListView$LayoutParams;-><init>(II)V

    invoke-virtual {v0, v1}, Lcom/kuguo/ad/ac;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    move-object v1, v0

    goto :goto_4
.end method
